#!/usr/bin/python
# -*- coding:utf-8 -*-

from tkinter import *


class App:
    """ tk dialog 的说明 """

    def __init__(self):
        self.top = Tk()
        self.top.geometry('550x360')
        self.top.title('Tkinter 窗口')
        self.top.resizable()
        self.btn_show = None
        self.create_widget()

    def create_widget(self):
        self.btn_show = Button(self.top, text='button show')
        self.btn_show.place(x=10, y=10, relwidth=0.3, height=25)

    def loop(self):
        self.top.mainloop()


if __name__ == '__main__':
    # write_file()
    app = App()
    app.loop()
    print(__file__, 'exec end.')
